﻿using System.Text;
using PacketRush.Core;
namespace PacketRush.Services.Commanding
{
    public class ServerCommandService : CommandService
    {
        public override void DeliverPacket(Packet packet)
        {
            PacketReader reader = new PacketReader(packet);

            string commandString = reader.CanReadString() ? reader.ReadString(Encoding.UTF8) : null;
           
            ExecuteCommand(commandString);
        }

        public override Packet CollectPacket()
        {
            return null;
        }
    }
}
